package com.aisile.wemedia.controller.v1;

import com.aisile.apis.wemedia.WmLoginControllerApi;
import com.aisile.model.common.dtos.ResponseResult;
import com.aisile.model.media.dtos.WmUserDto;
import com.aisile.wemedia.service.WmLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:yry
 * @Date:2024/1/4 0004
 * @VERSON:1.0
 */
@RestController
@RequestMapping("/api/v1/login")
public class WmLoginController implements WmLoginControllerApi {

    @Autowired
    private WmLoginService wmLoginService;

    @PostMapping("/in")
    @Override
    public ResponseResult login(@RequestBody WmUserDto dto) {
        return wmLoginService.login(dto);
    }
}
